package lp.xian.materials.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import lp.xian.materials.mapper.PurchaseTableMapper;
import lp.xian.materials.domain.PurchaseTable;
import lp.xian.materials.service.IPurchaseTableService;

/**
 * 采购订单数据Service业务层处理
 *
 * @author ruoyi
 * @date 2023-08-06
 */
@Service
public class PurchaseTableServiceImpl implements IPurchaseTableService
{
    @Autowired
    private PurchaseTableMapper purchaseTableMapper;

    /**
     * 查询采购订单数据
     *
     * @param purchaseTableId 采购订单数据主键
     * @return 采购订单数据
     */
    @Override
    public PurchaseTable selectPurchaseTableByPurchaseTableId(Integer purchaseTableId)
    {
        return purchaseTableMapper.selectPurchaseTableByPurchaseTableId(purchaseTableId);
    }

    /**
     * 查询采购订单数据列表
     *
     * @param purchaseTable 采购订单数据
     * @return 采购订单数据
     */
    @Override
    public List<PurchaseTable> selectPurchaseTableList(PurchaseTable purchaseTable)
    {
        return purchaseTableMapper.selectPurchaseTableList(purchaseTable);
    }

    /**
     * 新增采购订单数据
     *
     * @param purchaseTable 采购订单数据
     * @return 结果
     */
    @Override
    public int insertPurchaseTable(PurchaseTable purchaseTable)
    {
        return purchaseTableMapper.insertPurchaseTable(purchaseTable);
    }

    /**
     * 修改采购订单数据
     *
     * @param purchaseTable 采购订单数据
     * @return 结果
     */
    @Override
    public int updatePurchaseTable(PurchaseTable purchaseTable)
    {
        return purchaseTableMapper.updatePurchaseTable(purchaseTable);
    }

    /**
     * 批量删除采购订单数据
     *
     * @param purchaseTableIds 需要删除的采购订单数据主键
     * @return 结果
     */
    @Override
    public int deletePurchaseTableByPurchaseTableIds(Integer[] purchaseTableIds)
    {
        return purchaseTableMapper.deletePurchaseTableByPurchaseTableIds(purchaseTableIds);
    }

    /**
     * 删除采购订单数据信息
     *
     * @param purchaseTableId 采购订单数据主键
     * @return 结果
     */
    @Override
    public int deletePurchaseTableByPurchaseTableId(Integer purchaseTableId)
    {
        return purchaseTableMapper.deletePurchaseTableByPurchaseTableId(purchaseTableId);
    }
}
